# -*- coding: utf-8 -*-
import csv
import os.path

from conf.setting import DIR_path
from common.recordlog import logs


def read_csv_data(file_name):
    """
    读取scv文件数据
    :param file_name: 读取csv文件名
    :return:
    """
    try:
        with open(os.path.join(DIR_path, 'data', file_name), 'r', encoding='utf-8') as f:
            csv_reader = csv.reader(f)
            for value in csv_reader:
                print(value)
    except Exception as e:
        logs.error(e)

if __name__ == '__main__':
    print(read_csv_data('test_data.csv'))
